package com.wm.decorator;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @ClassName: Decorator
 * @Description: 装饰者
 * @Author: WM
 * @Date: 2023/4/26 9:22
 */
public class Decorator implements Sourceable {
    private final Logger logger = LoggerFactory.getLogger(Decorator.class);
    private Sourceable source;

    public Decorator(Sourceable source) {
        super();
        this.source = source;
    }

    @Override
    public void createComputer() {
        source.createComputer();
        // 创建完电脑后给电脑装上系统
        logger.info("make system.");
    }
}
